package ch1;

import java.util.Scanner;

public class Zuoye03073 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入您的购物金额:");
        double money = scan.nextDouble();
        if (money > 200) {
            System.out.println("1.加一元换购500毫升可乐\n2.加2元换购1000毫升果汁\n3.加4元换购炫迈口香糖一瓶\n4.加38元换购一瓶进口红酒\n5.加15元换购1袋面粉\n0.不换购");
            int b = scan.nextInt();
            switch (b) {
                case 1:
                    System.out.println("换购了500毫升可乐，实际支付" + (money + 1) + "元");
                    break;
                case 2:
                    System.out.println("换购了1000毫升果汁，实际支付" + (money + 2) + "元");
                    break;
                case 3:
                    System.out.println("换购了炫迈口香糖一瓶，实际支付" + (money + 4) + "元");
                    break;
                case 4:
                    System.out.println("换购了一瓶进口红酒，实际支付" + (money + 38) + "元");
                    break;
                case 5:
                    System.out.println("换购了1袋面粉，实际支付" + (money + 15) + "元");
                    break;
                case 0:
                    System.out.println("没换购，实际支付" + money + "元");
                    break;
                default:
                    System.out.println("您输入的号码不存在");
            }
        } else if (money > 100) {
            System.out.println("1.加一元换购500毫升可乐\n2.加2元换购1000毫升果汁\n3.加4元换购炫迈口香糖一瓶\n0.不换购");
            int b = scan.nextInt();
            switch (b) {
                case 1:
                    System.out.println("换购了500毫升可乐，实际支付" + (money + 1) + "元");
                    break;
                case 2:
                    System.out.println("换购了1000毫升果汁，实际支付" + (money + 2) + "元");
                    break;
                case 3:
                    System.out.println("换购了炫迈口香糖一瓶，实际支付" + (money + 4) + "元");
                    break;
                case 0:
                    System.out.println("没换购，实际支付" + money + "元");
                    break;
                default:
                    System.out.println("您输入的号码不存在");

            }


        } else if (money > 50) {
            System.out.println("1.加一元换购500毫升可乐\n0.不换购");
            int b = scan.nextInt();
            switch (b) {
                case 1:
                    System.out.println("换购了500毫升可乐，实际支付" + (money + 1) + "元");
                    break;
                case 0:
                    System.out.println("没换购，您实际支付" + money + "元");
                    break;
                default:
                    System.out.println("您输入的号码不存在");

            }
        } else {
            System.out.println("您实际支付" + money + "元");
        }
    }
}
